import Home from './view'
import { injectReducer } from '../../store/reducers'

export default (store) => ({
    component: Home,
    getComponent (location, cb) {
        require.ensure([], (require) => {
            const container = require('./container').default
            const reducer = require('./reducer').default

            injectReducer(store, { key: 'home', reducer })
            cb(null, container)
        }, 'home')
    },
})
